Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mission: move QGC plan import from mission to mission_raw #1343

Merged
merged 2 commits into from
Mar 5, 2021

Conversation

julianoes
Copy link
Collaborator

@julianoes julianoes commented Mar 3, 2021

This moves the method to import QGroundControl .plan JSON mission files from the mission plugin to the mission_raw plugin.

The reasoning is as follows:
The imported missions did not really fit the Mission API, and I guess that the mission progress was often wrong. When the missions were imported into mission, many items/commands were unsupported and dropped with a warning. Such a warning is not visible in the language wrappers and could lead to surprises. The documentation said that the method would fail if any unsupported item was being imported, however, that was not true anymore in code.

Therefore, in my opinion, it makes a lot more sense to implement the import in mission_raw where all/any mission items and commands can be imported. It's should be more complete, without surprises, and therefore safer to use.

And in later steps we can also add geofence and rally items to this API.

This PR contains the proto change and the implementation in code. It also slightly improves the parsing by moving it to a separate file and adding a bit more unit test coverage.

Depends on mavlink/MAVSDK-Proto#211.

JonasVautherin
JonasVautherin previously approved these changes Mar 5, 2021
Copy link
Collaborator

@JonasVautherin JonasVautherin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good except for an ifdef that I don't really get

examples/fly_qgc_mission/fly_qgc_mission.cpp Show resolved Hide resolved
src/plugins/mission/mission_impl.cpp Outdated Show resolved Hide resolved
third_party/openssl/CMakeLists.txt Outdated Show resolved Hide resolved
This moves the method to import QGroundControl .plan JSON mission files
from the mission plugin to the mission_raw plugin.

The reasoning is as follows:
The imported missions did not really fit the Mission API, and I guess
that the mission progress was often wrong. When the missions were
imported into mission, many items/commands were unsupported and dropped
with a warning. Such a warning is not visible in the language wrappers
and could lead to surprises. The documentation said that the method
would fail if any unsupported item was being imported, however, that
was not true anymore in code.

Therefore, in my opinion, it makes a lot more sense to implement the
import in mission_raw where all/any mission items and commands can be
imported. It's should be more complete, without surprises, and
therefore safer to use.

And in later steps we can also add geofence and rally items to this API.

This PR contains the proto change and the implementation in code. It
also slightly improves the parsing by moving it to a separate file and
adding a bit more unit test coverage.
@julianoes
Copy link
Collaborator Author

@JonasVautherin fixed what you raised, squashed commits and force pushed.

Copy link
Collaborator

@JonasVautherin JonasVautherin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!

@JonasVautherin JonasVautherin merged commit 1d5e356 into develop Mar 5, 2021
@JonasVautherin JonasVautherin deleted the pr-mission-import branch March 5, 2021 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants